﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace Platformer
{
    public class Background
    {
        Texture2D texture;
        Vector2 position, position2;
        PlatformerGame game;

        public Background(PlatformerGame game)
        {
            texture = game.Content.Load<Texture2D>("Background/background1");
            position2 = position + new Vector2(texture.Width, 0);
            this.game = game;
        }

        public void Update()
        {

        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(texture, position, Color.White);
            spriteBatch.Draw(texture, position2, Color.White);
        }

        public void Move(int distance)
        {
            position.X += distance;
            position2.X += distance;
        }
    }
}
